package com.job.ming.Zuoye0711.oop0711;

/**
 * @author Yangmingyu
 * @version 1.0
 * @since 2022-07-11 15:08:04
 */
public class Testpre {
    public static void main(String[] args) {
        //final修饰的局部变量
        final double pi=3.14;
        //pi=3.15; Cannot assign(标识) a value to final variable 'pi'

        Premier premier=Premier.getInstance();
        Premier premier1=Premier.getInstance();
        Premier premier2=Premier.getInstance();
        System.out.println(premier==premier1&&premier1==premier2);//比较地址

        premier.setName("t");
        System.out.println(premier1.getName());
        System.out.println(premier2.getName());
    }
}